<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>keyevent</title>

</head>
<body>

    <div id="app" >
        <input type="text" v-model="user.name">
    </div>
</body>
<script src="../node_modules/vue/dist/vue.js"></script>
<script>
    let vm = new Vue({
        el:"#app",
        data:{
          //name:"吴亮大傻逼"
            user:{
                id:1,
                name:"shabi",
                age:11
            }
        },
        watch:{
            // name(){
            //     console.log("yy")
            // }
            user:{
                deep:true,
                handler(val){
                    console.log(val)
                }
            }
        }
    })
</script>
</html>